package com.example.rabbit.controller;

import com.example.rabbit.producter.MsgProducer;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * @auth 贾枣阳
 * @date 2021/2/2 17:08
 */
@Controller
@RequestMapping("test")
public class MqController {

    @Resource
    private MsgProducer msgProducer;

    @RequestMapping("fall/{str}")
    public void basicExport(@PathVariable String str) throws IOException {

        msgProducer.sendMsg(str);

    }

}
